import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:jetour_line/base_widget/sliver_list_widget.dart';
import 'package:jetour_line/pages/baseWidget/line_item_widget.dart';
import "package:jetour_line/models/line_list_model.dart" as line_list;
class HomeLineWidget extends StatefulWidget {
   final List<line_list.ListElement> lineList ;
   HomeLineWidget({Key? key, required this.lineList}) : super(key: key);

  @override
  State<HomeLineWidget> createState() => _HomeLineWidgetState();
}

class _HomeLineWidgetState extends State<HomeLineWidget> {
  @override
  Widget build(BuildContext context) {
    return widget.lineList.isEmpty?SizedBox(): SliverListWidget.getSliverList(widget.lineList.length, (context, index) {
      return  LineItemWidget(line:widget.lineList[index]);
    });
  }
}
